RsrcMapEntry
To access the resource entries in a resource map in memory directly, you can use the RsrcMapEntry function.
FUNCTION RsrcMapEntry (theResource: Handle): LongInt;
theResource
- A handle to a resource.
DESCRIPTION
Given a handle to a resource, RsrcMapEntry returns the offset of the specified resource's entry from the beginning of the resource map in memory. If it doesn't find
the resource entry, RsrcMapEntry returns 0, and the ResError function returns the result code resNotFound. If you pass a handle whose value is NIL, RsrcMapEntry returns arbitrary data, but ResError returns the result code noErr.
- WARNING
- Because the Resource Manager provides routines for opening, retrieving, and changing resources, there's usually no reason to access a resource map directly. To avoid damaging the file for which it's called, you should use
RsrcMapEntry extremely carefully.
RESULT CODES
| noErr | 0 | No error |
| resNotFound | -192 | Resource not found |
SEE ALSO
For an overview of the resource map, see "The Resource Map" beginning on page 1-7. For details of the structure of the resource map, see Figure 1-14 on page 1-115.